package com.travel.modules.asset.entity;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.travel.commons.validator.groups.AddGroup;
import com.travel.commons.validator.groups.UpdateGroup;
import lombok.Data;

import javax.validation.constraints.NotBlank;

/**
 * @TableName strategy
 */
@Data
@TableName("strategy")
public class Strategy implements Serializable {
    /**
     *
     */
    @TableId
    private Integer id;

    /**
     * 攻略编号
     */
    private String strategyId;

    /**
     * 标题
     */
    @NotBlank(message = "标题不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String title;

    /**
     * 内容
     */
    @NotBlank(message = "文件路径不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String content;

    /**
     * 目标地址
     */
    private String targetAddr;

    /**
     * 图片，多个用 &* 分隔
     */
    private String pics;
    @TableField(exist = false)
    private String[] urls;

    /**
     * 发布者id
     */
    private Integer userId;
    @TableField(exist = false)
    private String loginName;
    @TableField(exist = false)
    private String username;

    /**
     * 发布时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table strategy
     */
    private static final long serialVersionUID = 1L;
}